package org.tgcloud.group.repository;

import org.apache.ibatis.annotations.Param;
import org.tgcloud.group.entity.MjGood;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author: zhy
 * @Created: 2025-09-17-下午6:51
 * @Description: ${description}
 */
public interface MjGoodMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MjGood record);

    int insertSelective(MjGood record);

    MjGood selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MjGood record);

    int updateByPrimaryKey(MjGood record);

    int updateNumByGoodId(@Param("goodId") Integer goodId, @Param("num") Integer num);

    void updatePriceByGoodId(@Param("goodId") Integer goodId, @Param("goodPrice") BigDecimal bigDecimal);

    List<Integer> selectIdListByOrderId(@Param("orderId") Integer orderId);

    MjGood selectIsHasGood(@Param("goodId") Integer goodId, @Param("orderId") Integer orderId);

    int updateStatusByOrderId(@Param("orderId") Integer orderId, @Param("status") short status);

    BigDecimal selectTotalPriceByOrderId(@Param("orderId") Integer orderId);

    List<MjGood> selectTestExpirationDateList();

    int updateExpirationDateById(@Param("goodId") Integer id, @Param("expirationDate") String expirationDate);

}